package com.bwie.controller;

import com.bwie.service.TbCustomerService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import com.bwie.vo.LoginVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @projectName: day0711
 * @package: com.bwie.controller
 * @className: IndexController
 * @author: 杨珂
 * @description: TODO
 * @date: 2025/7/11 10:44
 * @version: 1.0
 */
@RestController
@RequestMapping("/auth/index")
public class IndexController {


    @Autowired
    TbCustomerService tbCustomerService;


    @ApiOperation("发送手机验证码")
    @PostMapping("/sendCode/{phone}")
    public R sendCode(@PathVariable("phone") String phone) {
        return tbCustomerService.sendCode(phone);
    }


    @ApiOperation("手机号登录")
    @PostMapping("/loginPhone")
    public R loginPhone(@RequestBody LoginVo loginVo) {
        return tbCustomerService.loginPhone(loginVo);
    }


}
